<?php
$User_ID = $_GET['User_ID'];
?>
<?php 
require_once("includes/database.php"); 
$sql="SELECT  * FROM pet_info_db WHERE Owner_User_ID= '{$User_ID}'";
$list=mysql_query($sql,$con);
$result = array();
$result2 = array();
		
while($row=mysql_fetch_array($list))
{								 
	$list2 = array();
    $list2['value'] = $row['Pet_Name'].'/'.$row['Pet_Type'].'/'.$row['Pet_Breed'].'/'.$row['Pet_Gender'].'/'.$row['Pet_Age'].'/'.$row['Pet_Birthday'];
    $list2['pet_name'] = $row['Pet_Name'];
    $list2['pet_type'] =  $row['Pet_Type'];
    $list2['pet_breed'] = $row['Pet_Breed'];
	$list2['pet_gender'] = $row['Pet_Gender'];
	$list2['pet_age'] = $row['Pet_Age'];
	$list2['pet_birthday'] = $row['Pet_Birthday'];
	$list2['owner_name'] = $row['Pet_Owner'];
	$pet_no = $row["Page_No_User"];
	$page=$pet_no/5;
	$page= ceil ($page);
    $list2['href'] = "thesis_user_page.php?page=$page&pet_id=".$row["Pet_ID"];

    $result2[] = $list2;
}
$result['status'] = true;
$result['data'] = $result2;
echo json_encode($result);

?>